#!/bin/bash
cd `dirname $0`
TAGSDIR=`pwd`
rm -f $TAGSDIR/*.tags
for ENTRY in `python -c 'import sys; print " ".join(sys.path)'` ; do
    if [ -d $ENTRY ] ; then
        cd $ENTRY
        TAGFILE=$TAGSDIR/`pwd | md5`.tags
        if [ -f $TAGFILE ] ; then
            echo "Skipping duplicate $ENTRY (aka `pwd`)"
        else
            echo "$ENTRY --> $TAGFILE"
            find $ENTRY -type f | etags --output $TAGFILE -
        fi
    fi
done

